import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('timeBg')
export class timeBg extends Component {

    
    start() {

    }

    formatTime(seconds: number): string {
        const minutes = Math.floor(seconds / 60);  // 计算分钟数
        const remainingSeconds = seconds % 60;    // 计算剩余的秒数
        if(remainingSeconds<10){
            return `0${minutes}:0${remainingSeconds}`;
        }else{
            return `0${minutes}:${remainingSeconds}`;
        }
       
    }
}


